﻿using System;
using System.Data;

namespace Shopping.Entities
{
    /// -----------------------------------------------------------------------------
    ///<summary>
    /// The Info class for the CategoryProductInfo
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class CategoryProductInfo
    {
        #region Private Members

        private int _productId;
        private string _categoryAlia;
        #endregion
        #region Constructors
        // initialization
        public CategoryProductInfo()
        {
            _categoryAlia = "";
        }

        #endregion
        #region Public Properties
        /// <summary>
        /// Get and Set Property Data of File column ProductId in Table CategoryProduct 
        /// </summary>

        public int ProductId
        {
            get { return _productId; }
            set { _productId = value; }
        }

        /// <summary>
        /// Get and Set Property Data of File column CategoryAlias in Table CategoryProduct 
        /// </summary>

        public string CategoryAlia
        {
            get { return _categoryAlia; }
            set { _categoryAlia = value; }
        }

        #endregion

        #region IHydratable Implementation

        /// <summary>
        /// 
        /// </summary>        
        public void Fill(IDataReader oReader)
        {
            _productId = int.Parse(oReader["ProductId"].ToString());
            _categoryAlia = Convert.ToString(oReader["CategoryAlia"]);
        }
        #endregion
    }
}